<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// 默认路由 - 直接访问时指向admin模块
//Route::rule('/', 'app\module\admin\controller\index@index');
Route::post('admin/login', 'app\module\admin\controller\Index@login');
Route::get('admin/getMenusList', 'app\module\admin\controller\Auth@getMenusList');
Route::get('admin/getAuth', 'app\module\admin\controller\Auth@getAuth');

//
Route::get('admin/user/getUserInfo', 'app\module\admin\controller\User@getUserInfo');
Route::post('admin/user/save', 'app\module\admin\controller\User@save');
Route::post('admin/user/saveDepartment', 'app\module\admin\controller\User@save');
Route::post('admin/user/delDepartmentUser', 'app\module\admin\controller\User@save');
Route::post('admin/user/addRole', 'app\module\admin\controller\User@save');
Route::post('admin/user/delRole', 'app\module\admin\controller\User@save');

//
Route::get('admin/system/getDepartmentList', 'app\module\admin\controller\System@getDepartmentList');




// Admin模块路由
//Route::group('admin', function () {
//    Route::get('index', 'Index@index');
//})->prefix('app\module\admin\controller\\')->middleware(\app\middleware\AuthMiddleware::class);

// // API模块路由
// Route::group('api', function () {
//     Route::get('init', 'app\module\api\controller\Init@index');
//     Route::get('init/health', 'app\module\api\controller\Init@health');
//     Route::get('init/version', 'app\module\api\controller\Init@version');
//     Route::get('init/docs', 'app\module\api\controller\Init@docs');
// });
